package com.micro.db.dao;

import com.micro.model.DiskUser;
import com.micro.model.LoginToken;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;


public interface LoginTokenDao extends JpaRepository<LoginToken, String>,JpaSpecificationExecutor<LoginToken> {

    @Query("select t from LoginToken t where t.token = ?1 and t.expiretime > ?2 ")
    public LoginToken findByUsernameByToken(String token,java.util.Date time);

}
